package p270jp.pxv.android.view;

import android.annotation.SuppressLint;
import android.content.Context;
import android.util.AttributeSet;
import android.view.GestureDetector;
import android.view.MotionEvent;
import android.view.View;
import androidx.recyclerview.widget.RecyclerView;
import p325m0.MutabilityOwnership;

/* compiled from: ClickableRecyclerView.kt */
/* renamed from: jp.pxv.android.view.ClickableRecyclerView */
/* loaded from: classes2.dex */
public final class ClickableRecyclerView extends RecyclerView {

    /* renamed from: I0 */
    public GestureDetector f19462I0;

    /* renamed from: J0 */
    public View.OnClickListener f19463J0;

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public ClickableRecyclerView(Context context, AttributeSet attributeSet) {
        super(context, attributeSet, 0);
        MutabilityOwnership.m3745m(context, "context");
        if (!isInEditMode()) {
            this.f19462I0 = new GestureDetector(context, new p374nm.ClickableRecyclerView(this));
        }
    }

    @Override // androidx.recyclerview.widget.RecyclerView, android.view.View
    @SuppressLint({"ClickableViewAccessibility"})
    public boolean onTouchEvent(MotionEvent motionEvent) {
        MutabilityOwnership.m3745m(motionEvent, "event");
        GestureDetector gestureDetector = this.f19462I0;
        if (gestureDetector == null) {
            MutabilityOwnership.m3737u("gestureDetector");
            throw null;
        } else if (gestureDetector.onTouchEvent(motionEvent)) {
            return false;
        } else {
            return super.onTouchEvent(motionEvent);
        }
    }

    @Override // android.view.View
    public void setOnClickListener(View.OnClickListener onClickListener) {
        this.f19463J0 = onClickListener;
    }
}
